package com.cfoco.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import cn.afterturn.easypoi.excel.annotation.ExcelIgnore;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 饲养员实体
 * @author Administrator
 *
 */
@ExcelTarget("breederEntity")
@Data
@ToString
public class Breeder implements Serializable {

	@ExcelIgnore //忽略导出
	private Integer breid;
	@Excel(name="饲养员姓名",replace={"张晓龙_000"},width=12,orderNum = "0",needMerge = true)
	private String  brename;
	@Excel(name="性别",replace = {"男_1","女_0"})
	private Integer sex;
	@Excel(name="身份证号",width = 20)
	private String cardno;
	@Excel(name = "手机号")
	private String phone;
	@Excel(name="用户姓名",isImportField = "true")
	@NotNull
	private String username;
	private String password;
	@Excel(name = "是否管理员",replace = {"否_0","是_1"},width = 12)
	private Integer is_manager;
	private Integer if_valid;
	@Excel(name="创建日期",exportFormat = "yyyy-MM-dd",importFormat = "yyyy-MM-dd",width=15)
	private Date create_time;
	@Excel(name = "头像",type=2,width = 30,height = 30,imageType = 1,savePath = "d:/import")
	private String url;
	//增加猪舍集合，便于excel导出
	@ExcelCollection(name="猪舍",orderNum = "3")
	private List<Pigsty> pigstys;

	private String email;

}